<template>
  <div class="tab-list-container">
    <div class="tab-nav-wrap">
      <ul class="tab-nav bid-flex">
        <li class="nav-item left-slot">
          {{ headerData.leftSlot }}
        </li>
        <li class="nav-item"></li>
      </ul>
    </div>
    <div class="tab-content-wrap">
      <div class="company-row-item bid-flex">
        <div
          class="com-item"
          v-for="(item, idex) in companyList1[0]"
          :key="idex"
        >
          <div class="com-img-ctx">
            <img :src="item.img" alt="" />
          </div>
          <p class="company-name">{{ item.name }}</p>
        </div>
      </div>
      <div class="company-row-item bid-flex">
        <div
          class="com-item"
          v-for="(item, idex) in companyList1[1]"
          :key="idex"
        >
          <div class="com-img-ctx">
            <img :src="item.img" alt="" />
          </div>
          <p class="company-name">{{ item.name }}</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import comImg1 from "../assets/icon/platform_show_1.png";
import comImg2 from "../assets/icon/platform_show_2.png";
import comImg3 from "../assets/icon/platform_show_3.png";
import comImg4 from "../assets/icon/platform_show_4.png";
import comImg5 from "../assets/icon/platform_show_5.png";
import comImg6 from "../assets/icon/platform_show_6.png";
import comImg7 from "../assets/icon/platform_show_7.png";
import comImg8 from "../assets/icon/platform_show_8.png";
import comImg9 from "../assets/icon/platform_show_9.png";
import comImg10 from "../assets/icon/platform_show_10.png";
import comImg11 from "../assets/icon/platform_show_11.png";
import comImg12 from "../assets/icon/platform_show_12.png";
import comImg13 from "../assets/icon/platform_show_13.png";
import comImg14 from "../assets/icon/platform_show_14.png";
export default {
  name: "index-company-list",
  props: {
    headerData: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      companyList1: [
        [
          {
            img: comImg1,
            name: "中国核工业集团"
          },
          {
            img: comImg2,
            name: "中国航天科技集团"
          },
          {
            img: comImg3,
            name: "中国船舶集团"
          },
          {
            img: comImg4,
            name: "中国兵器工业集团"
          },
          {
            img: comImg5,
            name: "中国核工业集团"
          },
          {
            img: comImg6,
            name: "国家电网"
          },
          {
            img: comImg7,
            name: "中国华能集团"
          }
        ],
        [
          {
            img: comImg8,
            name: "中国大唐集团"
          },
          {
            img: comImg9,
            name: "中国华电集团"
          },
          {
            img: comImg10,
            name: "国家电力投资集团"
          },
          {
            img: comImg11,
            name: "国家能源投资集团"
          },
          {
            img: comImg12,
            name: "中国电信集团"
          },
          {
            img: comImg13,
            name: "中国联合网络通信集团"
          },
          {
            img: comImg14,
            name: "中国移动通信集团"
          }
        ]
      ]
    };
  }
};
</script>
<style scoped>
.tab-nav-wrap {
  background-color: #f0f0f0;
}

.left-slot,
.nav-item {
  height: 0.44rem;
  padding: 0 0.17rem;
  line-height: 0.44rem;
  font-size: 0.16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item {
  color: #1571ba;
  text-align: center;
  border-top: 0.02rem solid #1571ba;
  border-bottom: 0.01rem solid #ddd;
  background-color: #f0f0f0;
  box-sizing: border-box;
}

.left-slot {
  color: #fff;
  font-size: 0.18rem;
  /* border-top: 0.01rem solid #1571ba; */
  border-bottom: 0.01rem solid #1571ba;
  background-color: #1571ba;
}

.tab-nav .nav-item:last-child {
  flex: 2;
  border-right: 0.01rem solid #ddd;
}

.tab-nav .nav-item.active {
  padding-top: 0.02rem;
  border-left: 0.01rem solid #ddd;
  border-right: 0.01rem solid #ddd;
  border-bottom: none;
  background-color: #fff;
}

.tab-content-wrap {
  padding-top: 0.15rem;
  overflow: hidden;
  border-left: 0.01rem solid #ddd;
  border-right: 0.01rem solid #ddd;
  border-bottom: 0.01rem solid #ddd;
}

.company-row-item {
  margin: 0.24rem 0 0.18rem 0;
  justify-content: space-evenly;
}

.com-item {
  /* width: 1.71rem; */
  text-align: center;
}

.com-img-ctx {
  width: 1.5rem;
  height: 1.15rem;
}

.com-img-ctx img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  vertical-align: middle;
}

.company-name {
  width: 1.5rem;
  height: 0.4rem;
  line-height: 0.4rem;
  font-size: 0.15rem;
  overflow: hidden;
  white-space: nowrap;
}
</style>
